/**
 * Field.java
 * 卢晓峰
 * Email：lxf9601@gmail.com
 * QQ：297051898
 * Created by 2010-6-6
 */
package com.autoabacus.core.config.component;

import com.autoabacus.core.config.protocol.FieldProtocol.DataType;
import com.autoabacus.core.config.protocol.FieldProtocol.QueryStrategy;
import com.autoabacus.core.config.protocol.FieldProtocol.ViewStrategy;

/**
 * 数据字段结构
 * @author 卢晓峰
 */
public class Field {
	/** 字段名称 */
	private String name;
	
	/** 字段显示的别名 */
	private String alias;
	
	/** 数据类型 */
	private DataType dataType; 
	
	/** 字段是否为主键 */
	private boolean primaryKey;
	
	/** 超链接配置 */
	private String link;
	
	/** 引用字段 */
	private Field refField;
	
	/** 默认视图显示策略 */
	private ViewStrategy viewStrategy = ViewStrategy.SHOW;
	
	/** 默认视图查询策略 */
	private QueryStrategy queryStrategy = QueryStrategy.NONE;
	
	/** 默认视图的排序索引 */
	private int sortIndex;
	
	/** 词典名称 */
	private String dictionaryName;
	
	/** 视图模板 */
	private String viewTemplate;

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getAlias() {
		return alias;
	}

	public void setAlias(String alias) {
		this.alias = alias;
	}

	public boolean isPrimaryKey() {
		return primaryKey;
	}

	public void setPrimaryKey(boolean primaryKey) {
		this.primaryKey = primaryKey;
	}

	public String getLink() {
		return link;
	}

	public void setLink(String link) {
		this.link = link;
	}

	public Field getRefField() {
		return refField;
	}

	public void setRefField(Field refField) {
		this.refField = refField;
	}

	public ViewStrategy getViewStrategy() {
		return viewStrategy;
	}

	public void setViewStrategy(ViewStrategy viewStrategy) {
		this.viewStrategy = viewStrategy;
	}

	public QueryStrategy getQueryStrategy() {
		return queryStrategy;
	}

	public void setQueryStrategy(QueryStrategy queryStrategy) {
		this.queryStrategy = queryStrategy;
	}

	public int getSortIndex() {
		return sortIndex;
	}

	public void setSortIndex(int sortIndex) {
		this.sortIndex = sortIndex;
	}

	public String getDictionaryName() {
		return dictionaryName;
	}

	public void setDictionaryName(String dictionaryName) {
		this.dictionaryName = dictionaryName;
	}

	public String getViewTemplate() {
		return viewTemplate;
	}

	public void setViewTemplate(String viewTemplate) {
		this.viewTemplate = viewTemplate;
	}

	public DataType getDataType() {
		return dataType;
	}

	public void setDataType(DataType dataType) {
		this.dataType = dataType;
	}
	
}
